---
title: "Use Illegal Identifier Names"
description: "Handling (JS) naming collisions in ReScript"
canonical: "/docs/manual/use-illegal-identifier-names"
section: "JavaScript Interop"
order: 11
---

# Use Illegal Identifier Names

Sometime, for e.g. a let binding or a record field, you might want to use:

- A capitalized name.
- A name that contains illegal characters (e.g. emojis, hyphen, space).
- A name that's one of ReScript's reserved keywords.

We provide an escape hatch syntax for these cases:

<CodeTab labels={["ReScript", "JS Output"]}>

```res example
let \"my-🍎" = 10

type element = {
  \"aria-label": string
}

let myElement = {
  \"aria-label": "close"
}

let label = myElement.\"aria-label"

let calculate = (~\"Props") => {
  \"Props" + 1
}
```

```js
var my$$unknown$unknown$unknown$unknown = 10;

var myElement = {
  "aria-label": "close",
};

var label = myElement["aria-label"];

function calculate(Props) {
  return (Props + 1) | 0;
}
```

</CodeTab>

See the output. **Use them only when necessary**, for interop with JavaScript. This is a last-resort feature. If you abuse this, many of the compiler guarantees will go away.
